# -*- coding: utf-8 -*-
'''
Created on 25.02.2010

@author: FlashDeveloper
'''

 
import id3batproc.mp3utils

from id3batproc.mp3utils import *

cmds = { 
         EchoBuilder.ID:             EchoBuilder.makeInstance,
         UpdateArtistBuilder.ID:     UpdateArtistBuilder.makeInstance,
         UpdateGenreBuilder.ID:      UpdateGenreBuilder.makeInstance,
         MutantListBuilder.ID:       MutantListBuilder.makeInstance 
        }       
    
if __name__ == '__main__':
   
    workDir = os.getcwdu() 
    
    if len(sys.argv) < 2:
        print "error you must define command, one of :", cmds.keys()
        exit(1)
    
    cmdId = sys.argv[1] #
    
    if not cmds.has_key(cmdId):
        print "error unknow cmd: " + cmdId + " defined keys: " , cmds.keys()
        exit(1)

    factoryMethod = cmds[cmdId]
    
    builder = factoryMethod()
    
    walk(workDir , builder)
    
    
  
    
